Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sketch-on-face sketches to be in the artifact graph #5489

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jtran
Copy link
Collaborator

@jtran jtran commented Feb 25, 2025

Part of #5385.

We generate artifacts in sketch.rs purely client-side, and we return those in execArtifacts. It's super special for sketch on face and sketch on plane because it was a workaround for when building the artifact graph required an engine command. We use the information in those artifacts in certain cases, but it turns out that we never actually added those to the graph itself.

The main change in this PR is to add those client-side-only artifacts to the graph. See the second commit.

There's more rejiggering to make sketches-on-{face or plane} less special.

This is the new node in the graph for src/wasm-lib/kcl/tests/artifact_graph_example_code1/input.kcl. See the issue #5385 (comment) for more discussion.

Image

The thing that jumps out at me is that the profile doesn't depend on the sketch-on-face. You also can't traverse from the profile to the sketch-on-face because there's no graph edge from the wall to the sketch-on-face.

Copy link

qa-wolf bot commented Feb 25, 2025

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

Copy link

vercel bot commented Feb 25, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview Feb 25, 2025 6:05pm

Comment on lines +525 to +527
for exec_artifact in exec_artifacts.values() {
merge_artifact_into_map(&mut map, exec_artifact.clone());
}
Copy link
Collaborator Author

@jtran jtran Feb 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the core of the change.

It's unfortunate that there are two loops, this one and the one above. I think this might cause some problems when there are multiple sketches-on-face/place on the same face/plane.

@jtran jtran force-pushed the jtran/plane-code-ref branch from 0f00752 to 88b06d1 Compare February 25, 2025 06:04
Copy link

codecov bot commented Feb 25, 2025

Codecov Report

Attention: Patch coverage is 94.73684% with 2 lines in your changes missing coverage. Please review.

Project coverage is 86.35%. Comparing base (4297dc4) to head (dd7565e).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/wasm-lib/kcl/src/execution/artifact.rs 90.47% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5489      +/-   ##
==========================================
+ Coverage   86.26%   86.35%   +0.08%     
==========================================
  Files          95       95              
  Lines       35901    35950      +49     
==========================================
+ Hits        30970    31044      +74     
+ Misses       4931     4906      -25     
Flag Coverage Δ
wasm-lib 86.35% <94.73%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

franknoirot added a commit that referenced this pull request Feb 25, 2025
Leveraging the new data that was introduced by
#5489
Copy link
Collaborator

@franknoirot franknoirot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is working great for me! I actually was already able to stack a little PR off of your branch #5497

@jtran jtran requested a review from Irev-Dev February 25, 2025 17:33
@jtran jtran marked this pull request as ready for review February 25, 2025 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants